From 4c74f9e66c6765f771f816ae64adaa2da66ed013 Mon Sep 17 00:00:00 2001 From: real-zephex Date: Fri, 26 Apr 2024 23:57:32 +0530 Subject: trying to implement edge runtime --- src/app/manga/[title]/[id]/[read]/page.jsx | 2 ++ src/app/manga/[title]/[id]/page.jsx | 4 +++- src/app/manga/[title]/page.jsx | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src/app/manga/[title]') diff --git a/src/app/manga/[title]/[id]/[read]/page.jsx b/src/app/manga/[title]/[id]/[read]/page.jsx index 01080bf..f1e777d 100644 --- a/src/app/manga/[title]/[id]/[read]/page.jsx +++ b/src/app/manga/[title]/[id]/[read]/page.jsx @@ -2,6 +2,8 @@ import styles from "./read.module.css"; import Image from "next/image"; import DownloadManga from "./download"; +export const runtime = "edge"; + export default async function Read({ params }) { const chapterId = params.read; const results = await getPages(chapterId); diff --git a/src/app/manga/[title]/[id]/page.jsx b/src/app/manga/[title]/[id]/page.jsx index ffd962d..2c1fcc8 100644 --- a/src/app/manga/[title]/[id]/page.jsx +++ b/src/app/manga/[title]/[id]/page.jsx @@ -5,6 +5,8 @@ import { redirect } from "next/navigation"; import { FaStar } from "react-icons/fa"; import { PreFetchChaterLinks } from "../../cacher"; +export const runtime = 'edge'; + export default async function MangaInfo({ params }) { const id = params.id; const data = await getMangaInfo(id); @@ -129,7 +131,7 @@ export default async function MangaInfo({ params }) { async function getMangaInfo(id) { const res = await fetch( `https://consumet-jade.vercel.app/meta/anilist-manga/info/${id}?provider=mangadex`, - { next: { revalidate: 86400 } } + { next: { revalidate: 21600 } } ); const data = await res.json(); return data; diff --git a/src/app/manga/[title]/page.jsx b/src/app/manga/[title]/page.jsx index 4446d05..fd406ac 100644 --- a/src/app/manga/[title]/page.jsx +++ b/src/app/manga/[title]/page.jsx @@ -3,7 +3,7 @@ import Image from "next/image"; import Link from "next/link"; import { PreFetchMangaInfo } from "../cacher"; -// This page displays all the available mangas or manhwas when the user searches for one/ +export const runtime = 'edge'; export default async function MangaInfo({ params }) { const title = params.title; -- cgit v1.2.3